subroutine comput_flux2
use var
implicit none

    integer m,j,i
    real(8) f(0:gridsx,0:gridsy,4)
    real(8) local_max
    real(8) f_m,f_p,eps,b
    select case(c_case)
    case(9,10,13,14,15,16)            
        eps=1E-40
        call share_space_y
        do i=1,gridsx        
            Qy_m(i,0:gridsy,2)=Qy_m(i,0:gridsy,1)*Qy_m(i,0:gridsy,2)!Qx_m(i,j,2)=u_i+1/2*rho_i+1/2
            Qy_m(i,0:gridsy,3)=Qy_m(i,0:gridsy,1)*Qy_m(i,0:gridsy,3)!Qx_m(i,j,3)=v_i+1/2*rho_i+1/2
            select case(c_eos)
            case(1)!理想气体
                Qy_m(i,0:gridsy,4)=Qy_m(i,0:gridsy,4)/(gamma-1.d0)+0.5d0*(Qy_m(i,0:gridsy,2)**2+Qy_m(i,0:gridsy,3)**2)/Qy_m(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            case(2)!b=0.075d0
                b=0.075d0
                Qy_m(i,0:gridsy,4)=Qy_m(i,0:gridsy,4)*(1.d0-b*Qy_m(i,0:gridsy,1))/(gamma-1.d0)+0.5d0*(Qy_m(i,0:gridsy,2)**2+Qy_m(i,0:gridsy,3)**2)/Qy_m(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            endselect
            Qy_p(i,0:gridsy,2)=Qy_p(i,0:gridsy,1)*Qy_p(i,0:gridsy,2)!Qx_m(i,j,2)=u_i+1/2*rho_i+1/2
            Qy_p(i,0:gridsy,3)=Qy_p(i,0:gridsy,1)*Qy_p(i,0:gridsy,3)!Qx_m(i,j,3)=v_i+1/2*rho_i+1/2
            select case(c_eos)
            case(1)!理想气体
                Qy_p(i,0:gridsy,4)=Qy_p(i,0:gridsy,4)/(gamma-1.d0)+0.5d0*(Qy_p(i,0:gridsy,2)**2+Qy_p(i,0:gridsy,3)**2)/Qy_p(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            case(2)!b=0.075d0
                b=0.075d0
                Qy_p(i,0:gridsy,4)=Qy_p(i,0:gridsy,4)*(1.d0-b*Qy_p(i,0:gridsy,1))/(gamma-1.d0)+0.5d0*(Qy_p(i,0:gridsy,2)**2+Qy_p(i,0:gridsy,3)**2)/Qy_p(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            endselect
        enddo
    case default!non share weight 
        eps=1E-40
        do i=1,gridsx        
            call space(gridsy,KRy,c_case,dy,eps,d(i,:), Qy_p(i,:,1), Qy_m(i,:,1))
            call space(gridsy,KRy,c_case,dy,eps,u(i,:), Qy_p(i,:,2), Qy_m(i,:,2))
            call space(gridsy,KRy,c_case,dy,eps,v(i,:), Qy_p(i,:,3), Qy_m(i,:,3))
            call space(gridsy,KRy,c_case,dy,eps,p(i,:), Qy_p(i,:,4), Qy_m(i,:,4))
            Qy_m(i,0:gridsy,2)=Qy_m(i,0:gridsy,1)*Qy_m(i,0:gridsy,2)!Qx_m(i,j,2)=u_i+1/2*rho_i+1/2
            Qy_m(i,0:gridsy,3)=Qy_m(i,0:gridsy,1)*Qy_m(i,0:gridsy,3)!Qx_m(i,j,3)=v_i+1/2*rho_i+1/2
            select case(c_eos)
            case(1)!理想气体
                Qy_m(i,0:gridsy,4)=Qy_m(i,0:gridsy,4)/(gamma-1.d0)+0.5d0*(Qy_m(i,0:gridsy,2)**2+Qy_m(i,0:gridsy,3)**2)/Qy_m(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            case(2)!b=0.075d0
                b=0.075d0
                Qy_m(i,0:gridsy,4)=Qy_m(i,0:gridsy,4)*(1.d0-b*Qy_m(i,0:gridsy,1))/(gamma-1.d0)+0.5d0*(Qy_m(i,0:gridsy,2)**2+Qy_m(i,0:gridsy,3)**2)/Qy_m(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            endselect
            Qy_p(i,0:gridsy,2)=Qy_p(i,0:gridsy,1)*Qy_p(i,0:gridsy,2)!Qx_m(i,j,2)=u_i+1/2*rho_i+1/2
            Qy_p(i,0:gridsy,3)=Qy_p(i,0:gridsy,1)*Qy_p(i,0:gridsy,3)!Qx_m(i,j,3)=v_i+1/2*rho_i+1/2
            select case(c_eos)
            case(1)!理想气体
                Qy_p(i,0:gridsy,4)=Qy_p(i,0:gridsy,4)/(gamma-1.d0)+0.5d0*(Qy_p(i,0:gridsy,2)**2+Qy_p(i,0:gridsy,3)**2)/Qy_p(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            case(2)!b=0.075d0
                b=0.075d0
                Qy_p(i,0:gridsy,4)=Qy_p(i,0:gridsy,4)*(1.d0-b*Qy_p(i,0:gridsy,1))/(gamma-1.d0)+0.5d0*(Qy_p(i,0:gridsy,2)**2+Qy_p(i,0:gridsy,3)**2)/Qy_p(i,0:gridsy,1)!p/(gamma-1)+0.5rho(u**2+v**2)
            endselect
        enddo
    endselect
    !call comput_Qy_m
    !call comput_Qy_p
    call L_F_local_y(Qy_m,Qy_p,f)
    do m=1,4
        do j=0,gridsy
            do i=1,gridsx
                flux2(i,j,m)=f(i,j,m)
            enddo                
        enddo  
    enddo
    
end subroutine